# Let's create a log device file in glftpd's chroot
# We can use it to log messages.
# Put this file into /etc/rsyslog.d/ and restart
# /etc/init.d/rsyslog restart
#
# should work on debian/wheezy/jessie
#
#
#module(load="imuxsock") # needs to be done just once
input(type="imuxsock" HostName="chroot.glftpd" Socket="/jail/glftpd/dev/log")
$template glftpdFormat,"%timegenerated:::date-wdayname% %timegenerated:1:3% %timegenerated:::date-day% %timegenerated:::date-hour%:%timegenerated:::date-minute%:%timegenerated:::date-second% %timegenerated:::date-year% %syslogtag% %msg:2:2048%\n"
# Log anything from host glftpd to logfile
if $hostname == 'chroot.glftpd' then /jail/glftpd/ftp-data/logs/syslog.log;glftpdFormat
if $hostname == 'chroot.glftpd' then ~
& ~
